Skip to main content

Inbound Messages Callback

This callback delivers contact (end-user) messages to the API clients.

Message Fields​

FieldTypeDescription
idstringMessage ID
directionstringAlways TO_APP for contact messages
contact_messageobjectThe content of the message
channel_identityobjectIdentity of the contact in the underlying channel
conversation_idstringID of the conversation. Empty if DISPATCH mode
contact_idstringID of the contact. Empty if DISPATCH mode
metadatastringChannel-specific metadata
accept_timeISO 8601 timestampWhen the channel callback was received
sender_idstringSender ID (e.g. originator MSISDN for SMS)
processing_modestringCurrently only DISPATCH mode supported

Contact Message Types​

Text Message​

FieldTypeDescription
textstringThe text included in the contact message

Location Message​

FieldTypeDescription
titlestringShown above the location
coordinates.latitudefloatLatitude
coordinates.longitudefloatLongitude
labelstringLabel or name for the position

Choice Response Message​

FieldTypeDescription
message_idstringThe message ID containing the choice
postback_datastringPostback data from the selected choice

Media Message​

FieldTypeDescription
urlstringURL of the media
captionstringCaption for the media

Reply To​

FieldTypeDescription
message_idobjectID of the message this contact message is responding to

Only set if the response was sent within 3 days of the original message.

Product Response Message​

FieldTypeDescription
productsobject arraySelected products
textstringText sent with the products
catalog_idstringCatalog ID the products belong to

Fallback Message​

FieldTypeDescription
reason.codestringHigh-level error classification
reason.descriptionstringDescription of the reason
reason.sub_codestringMore detailed error classification

Channel Identity Fields​

FieldTypeDescription
channelstringChannel identifier: SMS, RCS, WHATSAPP
identitystringChannel identity (e.g. phone number)
app_idstringApp ID if app-scoped identity. Empty string otherwise

Sample Inbound Message Payload​

{
"app_id": "01EB37HMH1M6SV18ABNS3G135H",
"accepted_time": "2020-11-16T08:17:44.993024Z",
"project_id": "c36f3d3d-1523-4edd-ae42-11995557ff61",
"message": {
"id": "01EQ8235TD19N21XQTH12B145D",
"direction": "TO_APP",
"contact_message": { "text_message": { "text": "Hi!" } },
"channel_identity": { "channel": "WHATSAPP", "identity": "017838245667", "app_id": "01EB37HMH1M6SV18ABNS3G135H" },
"conversation_id": "01EQ8172WMDB8008EFT4M30481",
"contact_id": "01EQ4174TGGY5B1VPTPGHW19R0",
"accept_time": "2020-11-16T08:17:43.915829Z",
"sender_id": "12039414555",
"processing_mode": "CONVERSATION"
}
}